    /**验证身份证号 */
    const identifyCode = new RegExp(
        /(^\d{8}(0\d|10|11|12)([0-2]\d|30|31)\d{3}$)|(^\d{6}(18|19|20)\d{2}(0[1-9]|10|11|12)([0-2]\d|30|31)\d{3}(\d|X|x)$)/
    );
export const getRules = ()=>{
    return {
        name:[{
            required: true,
            validator: (rule, val, callback) => {
                if (!val) {
                    return Promise.reject('姓名不能为空');
                }
                return Promise.resolve();
            },
        }],
        identify:[{
            required: true,
            validator: (rule, val, callback) => {
                if (!val) {
                    return Promise.reject('身份证号不能为空');
                }
                if (!identifyCode.test(val)) return Promise.reject('身份证号格式不正确');
                return Promise.resolve();
            },
        }]
    }
}